<template>
  <div>
    <ul>
      <li>新闻1</li>
      <li>新闻2</li>
      <li>新闻3</li>
      <li>新闻4</li>
    </ul>
  </div>
</template>
<script>
export default {
  data(){
    return {

    }
  },
  created(){
    // $route 拿到的是处于活跃状态的路由
    console.log(this.$route);
  },
  mounted(){
    console.log('news mounted');
  },
  updated(){
    console.log('news updated');
  },
  // deactivated 和 activated 想使用需要 index 页面用 keep-alive 包住 router-view
  deactivated(){
    console.log('news deactivated');
  },
  activated(){
    console.log('news activated');
  },

}
</script>
<style lang="scss" scoped>
ul li{
  margin-bottom: 15px;
}
</style>
